package com.xcf.center;

import org.apache.curator.RetryPolicy;
import org.apache.curator.retry.ExponentialBackoffRetry;

public class ZookeeperRegisterConfig {

    private String zookeeperIP = "127.0.0.1";

    private Integer zookeeperPort = 2181;

    private RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);;

    private Integer sessionTimeOut = 5000;

    private Integer connectTimeOut = 3000;

    public String getZookeeperIP() {
        return zookeeperIP;
    }

    public void setZookeeperIP(String zookeeperIP) {
        this.zookeeperIP = zookeeperIP;
    }

    public Integer getZookeeperPort() {
        return zookeeperPort;
    }

    public void setZookeeperPort(Integer zookeeperPort) {
        this.zookeeperPort = zookeeperPort;
    }

    public RetryPolicy getRetryPolicy() {
        return retryPolicy;
    }

    public void setRetryPolicy(RetryPolicy retryPolicy) {
        this.retryPolicy = retryPolicy;
    }

    public Integer getSessionTimeOut() {
        return sessionTimeOut;
    }

    public void setSessionTimeOut(Integer sessionTimeOut) {
        this.sessionTimeOut = sessionTimeOut;
    }

    public Integer getConnectTimeOut() {
        return connectTimeOut;
    }

    public void setConnectTimeOut(Integer connectTimeOut) {
        this.connectTimeOut = connectTimeOut;
    }

    public String getConnectSting() {
        return zookeeperIP + ":" + zookeeperPort;
    }
}
